#from django.db import models
#import datetime
#from settings import MyConstants
#from jrcmodel.models import Market

#class JrcSystem(models.Model):
#    name = models.CharField(max_length=128)
#    status_id = models.IntegerField(default=1, choices = MyConstants.STATUS_CHOICES)
#    source_code = models.TextField()
#    priority = models.IntegerField(default=0)
#    
#    description = models.CharField(max_length = 512, blank = True)
#
#    created_at = models.DateField(default = datetime.datetime.now())
#    
#    def __unicode__(self):
#        return "%s" % self.name
#    
#    def status_name(self):
#        return MyConstants.get_status_name(self.status_id)
#    
#class JrcParameter(models.Model):
#    system_id = models.ForeignKey(JrcSystem)
#    market_id = models.ForeignKey(Market)
#    status_id = models.IntegerField(default = 1, choices = MyConstants.STATUS_CHOICES)
#    direction_id = models.CharField(max_length = 2, choices = MyConstants.DIRECTION_CHOICES)
#    cash_or_future = models.CharField(max_length = 2, choices = MyConstants.CASH_OR_FUTURE)
#    day_begin = models.DateField(null = True, blank = True)
#    day_end = models.DateField(null = True, blank = True)
#    source_code = models.TextField(blank = True)
#    priority = models.IntegerField(default = 0)
#    
#    filename = models.CharField(max_length = 256, blank = True)
#
##    class Meta:
##        verbose_name = "JRC parameter"
##        verbose_name_plural = "Administration of trading systems"
#
#
#    created_at = models.DateField(default = datetime.datetime.now())
#    
#    def status_name(self):
#        return MyConstants.get_status_name(self.status_id)
#    
#    def direction_name(self):
#        return MyConstants.get_direction_name(self.direction_id)
#    
#    def asset_class(self):
#        return self.market_id.asset
#    
#    def market_name(self):
#        return self.market_id.name
#    
#    def cash_or_future_name(self):
#        if self.cash_or_future == "C":
#            return "Cash"
#        return "Future"
#
##    def __unicode__(self):
##        return "%d %s" % (self.system_id, self.direction_id)
